#include <stdio.h>
int main()
{
	int n;
	scanf("%d",&n);
	int m=0,k=0;
	while(n!=0)
	{
		k=n%10;
		m=m*10+k;
		n=n/10;
	}
	printf("%d",m);
	return 0;
}
